<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="MvcContrib.FluentHtml.ModelViewPage<Universum.Views.BlogArticle.BlogArticleShowViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Show
</asp:Content>
<asp:Content ID="BreadcrumbsContent" ContentPlaceHolderID="Breadcrumbs" runat="server">
	<%= Html.Breadcrumb().Home().Append<BlogsController>(c => c.Index(), "Posts from "+ ( Model != null ? Model.Article.Username?? "blog" : "blog")).AppendText( Model != null ? Model.Article.Title: "Untitled").End()%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2 >
		<em>
			<%= Model.Article. Title %></em></h2>
	<div class="span-22">
		<%= Model.Article.Text %>
	</div>
	<h2>
		<em><strong><a href="#leave-comment">Comments</a></strong></em></h2>
	<div class="post-comments span-22">
		<% foreach (var item in Model.Comments)
	 { %>
		<%--<div class="span-22 comment">--%>
		<h3 class="comment-title">
			<a href="#">
				<%= item.Title %>
				<span><em>by
					<%= item.Username %></em> <small>Submitted  <%= Html.TimePassedSince(item.Created) %> ago</small> </span></a> </h3>
		<div class="comment-text">
		
			<%= item.Text %>
		</div>
		<%--</div>--%>
		<% } %>
	</div>
	<div class="span-22">
		<% Html.RenderPartial("Comment", Model.NextComment, Model.ViewData); %>
	</div>
	<p>
		<%-- <%=Html.UserActionLink("Edit", "Edit", new { id=Model.ID  }) %> |
        <%=Html.UserActionLink("Back to List", "Index") %>--%>
	</p>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
	<link rel="Stylesheet" type="text/css" href="<%= Html.ResolveUrl("~/content/css/start/ui.css") %>" />

	<script type="text/javascript" src="<%= new ContentDirectoryService("scripts/jqueryui.js").Path %>"></script>
<script type="text/javascript" src="<%= new ContentDirectoryService("scripts/jquery.tooltip.js").Path %>"></script>
	<script type="text/javascript" src="<%= new ContentDirectoryService("scripts/jquery.validate.js").Path %>"></script>

	<script type="text/javascript">
		$(function() {
			$(".post-comments").accordion(

		{ active: false, autoHeight: false,
			collapsible: true
		}

		);
			
			$("form").each(function() {
				$(this).validate(
			{
				rules:
				{
					Text: "required"
				},
				messages: {
					Text: "You cannot post a comment without any text"
				}
			}
			)
			});

		});
	</script>

</asp:Content>
